package com.itts.middle.modules.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itts.common.entity.Project;
import com.itts.common.entity.ProjectUser;
import com.itts.common.entity.ProjectVO;
import com.itts.common.entity.dto.ProjectUserDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ProjectMapper extends BaseMapper<Project> {


    //基于mybatis 的注解映射
    @Select("SELECT * FROM `project` WHERE id =#{id}")
    List<Project> pagelist(@Param("id") Integer id);

    //基于接口形式的xml 查询
    List<ProjectVO> list(IPage<ProjectVO> page, @Param("map") Map map, @Param("projectIds") List<Integer> projectIds);

    //
    //List<ProjectUserDTO> ProjectUserResultMap();

    //子查询
    List<ProjectUser> selectProjectUser();

    List<ProjectUser> selectUser();
}
